/*
 * <p>Copyright® 2009-2022 东软 IT 实训中心版权所有。</p>
 */

package com.max.back.doctor.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.max.back.entity.CodeName;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
* @description 
* 
* <p>
* <code>CodeNameDao</code>
*
* </p>
* 
* @see 
* @author 辛凤文 forward.seen@foxmail.com
* @version 1.0 
* @time 2022/7/24 20:32 
*/
@Repository("doctorCodeNameDao")
public interface CodeNameDao extends BaseMapper<CodeName> {
    public static final Integer NOT_OVERCHARGE = 901;
    public static final Integer ALREADY_ACCEPTS = 902;
    public static final Integer ACCEPTS = 903;

    @Select({
            "select K,V from code_name where type=#{type}"
    })
    List<Map<String,Object>> queryMapsByType(String type);

    @Select({
            "select V from code_name where K=#{key}"
    })
    String queryByKey(@Param("key") Integer key);

}